package de.sane.product



case class Product(name: String, val stock: Stock = new Stock()) {

	require(name != null && stock != null) 

	def add(value: Stock): Product = {
		new Product(name, stock + value)
	}
	
	def remove(value: Stock): Product = {
		new Product(name, stock - value)
	}
	
	def clear(): Product = {
		new Product(name, Stock())
	}
	
	
}
